﻿@model DistanceLearning.Models.LessonTime[]

@{
    AjaxOptions ajaxOptions = new AjaxOptions {
        //UpdateTargetId = "subjects_list",
        Url = Url.Action("SaveSchedule", "Administration"),
        HttpMethod = "POST",
        
    };
}
<h2>Расписание звонков</h2>

@using(Ajax.BeginForm(ajaxOptions))
{
    <div class="edit_form">
        <div class="line">
                <a>Заполните время начала уроков</a>
            </div>
        @for (int i = 0; i < Model.Length; ++i)
        {
            int j = i;
            @Html.HiddenFor(x => x[i].Order)

            <div class="line">
                
                @Html.DevExpress().Label(s => { s.Text = (j+1) + " урок"; }).GetHtml()
                @Html.DevExpress().TimeEditFor(x => x[j].StartTime).GetHtml()
            </div>
        }
        <div class="line">
            <input type="submit" value="Изменить"/>
        </div>
    </div>
}